<template>
  <div>
    <h1>Movie</h1>
    <h3>count的值是{{ count }}</h3>
    <button @click="getMovieList">请求电影列表</button>
    <ul>
      <li v-for="item in movieList" :key="item.tvId">
        <h2>电影名称:{{ item.albumName }}</h2>
        <p>电影类型:{{ item.categories }}</p>
      </li>
    </ul>
  </div>
</template>

<script>
import { mapState,mapActions } from "vuex";

export default {
  name: "Movie",
  computed: {
    ...mapState("movie", ["movieList"]),
    ...mapState("count", ["count"]),
  },
  methods: {
    ...mapActions("movie", ["getMovieList"]),
  },
};
</script>

<style scoped></style>
